
SHELL = /bin/sh


#----------------------------------------------------------- SETUP

TOPDIR = ../../../../..
include $(TOPDIR)/Makefile.common

#JAVAC = javac -classpath $(SSFNET_TEST_CLASSPATH)
JAVAC = javac
JAVA  = java -mx1024m -classpath $(SSFNET_TEST_CLASSPATH)

#----------------------------------------------------------- MAKE ALL

all:
	@echo targets: dumpData WWWtest flowCampus2 filterTest WWWCampus2
	
test: dumpData WWWtest flowCampus2 filterTest WWWCampus2

flowCampus2:
	@echo
	@echo 'It will take a while ...' 
	@echo
	$(JAVA) SSF.Net.Net 200 flowCampus2.dml $(TOPDIR)/examples/net.dml > flowCampus2.out 2>&1

	@echo
	@echo '------------- campus2 test COMPLETED (see flowCampus2.out)'
	@echo '------------- see also flow_data/flowCampus2.dat.0'
	@echo

dumpData:
	$(JAVA) SSF.Net.Net 200 dumpData.dml $(TOPDIR)/examples/net.dml > dumpData.out 2>&1

	@echo
	@echo '--------------- dump data test COMPLETED (see dumpData.out)'
	@echo '--------------- see also flow_data/dumpData.dat.0 '
	@echo
	$(JAVA) SSF.OS.NetFlow.Util.IpFlowReporter flow_data/dumpData.dat.0 netflow.0

filterTest:
	$(JAVA) SSF.OS.NetFlow.Filter.FilterPlayer filterTest.dml flow_data/WWWCampus2.dat.0 netflow.0> filterTest.out 2>&1
	@echo
	@echo '--------------- filter Test COMPLETED (see filterTest.out)'
	@echo
WWWtest:
	$(JAVA) SSF.Net.Net 500 WWWtest.dml dictionary.dml $(TOPDIR)/examples/net.dml > WWW.out 2>&1

	@echo
	@echo '--------------- WWW test COMPLETED (see WWW.out)'
	@echo '--------------- raw data in flow_data/WWWtest.dat.*'
	@echo
	$(JAVA) SSF.OS.NetFlow.Util.IpFlowReporter flow_data/WWWtest.dat.0 netflow.0
	
WWWCampus2:
	@echo
	@echo 'This one takes some time...'
	@echo
	$(JAVA) SSF.Net.Net 500 dictionary.dml WWWCampus2.dml $(TOPDIR)/examples/net.dml > WWWCampus2.out 2>&1
	@echo
	@echo '-------------- WWW Campus2 test COMPLETED (see WWWCampus2.out)'
	@echo '-------------- Raw binary data in flow_data/WWWCampus2.dat.*'
	@echo

clean:
	rm -f *.out *.dml~
	cd flow_data; rm -f *dat.0
